//首先引入useState、useCookie
import { useState, useCookie } from "nuxt/app";
 
export const useInfo = () => useState("userData",() => {
    return {
        id: 1,
        name: '用户1'
    }
})
 
// token
export const useToken = () => useState("token",()=> "aaadd232cfdfdf23fdf") 